# Contributor: Simon Zeni <simon@bl4ckb0ne.ca>
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
pkgname=waffle
pkgver=1.7.0
pkgrel=0
pkgdesc="C library for selecting an OpenGL API and window system at runtime"
options="!check" # tests are platform dependant (x11/wayland)
url="https://gitlab.freedesktop.org/mesa/waffle"
arch="all"
license="BSD-2-Clause"
makedepends="eudev-dev mesa-dev mesa-gbm mesa-egl wayland-dev meson cmocka-dev
	cmake"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-bash-completion
	"
source="https://gitlab.freedesktop.org/mesa/waffle/-/archive/v$pkgver/waffle-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson \
		-Dbuild-examples=false \
		build
	meson compile ${JOBS:+-j ${JOBS}} -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}
sha512sums="
49893570f9973c4b0ac3cbc9dcd61c05273226c4916ebc80ae238f96a6c17e906d3f025aaed310eb387bc4d31bb8f2b77a738c1b88a2bd30a6e0e855738b82bc  waffle-v1.7.0.tar.gz
"
